# census_filters.py
# Some custom filters for dictionary lookup.
from django import template

register = template.Library()

@register.filter(name='lookup')
def lookup(dictionary, index):
    if index in dictionary:
        return dictionary[index]
    return ''